home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 7
/
Amiga Format AFCD07 (Dec 1996, Issue 91).iso
/
serious
/
shareware
/
programming
/
muirexx2.1
/
demos
/
demo.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-08-28
|
13KB
|
259 lines
/* */
options results
/* Method TAG ID definitions */
Notify = 0x8042c9cb
Set = 0x8042549a
NoNotifySet = 0x8042216f
Application_AboutMUI = 0x8042d21d /* { ULONG MethodID; Object *refwindow; }; */
Application_OpenConfigWindow = 0x804299ba /* { ULONG MethodID; ULONG flags; }; */
/* Attribute TAG ID definitions */
Draggable = 0x80420b6e
Listview_DragType = 0x80425cd3
List_Format = 0x80423c0a /* V4 isg STRPTR */
FillArea = 0x804294a3 /* V4 is. BOOL */
Frame = 0x8042ac64 /* V4 i.. LONG */
Weight = 0x80421d1f /* V4 i.. WORD */
Gauge_Current = 0x8042f0dd /* V4 isg LONG */
Gauge_Divide = 0x8042d8df /* V4 isg BOOL */
Gauge_Horiz = 0x804232dd /* V4 i.. BOOL */
Gauge_Max = 0x8042bcdb /* V4 isg LONG */
Numeric_Value = 0x8042ae3a
Menuitem_Title = 0x804218be
Menuitem_Shortcut = 0x80422030 /* V8 isg STRPTR */
Boopsi_MinHeight = 0x80422c93 /* V4 isg ULONG */
Boopsi_MinWidth = 0x80428fb2 /* V4 isg ULONG */
Boopsi_Remember = 0x8042f4bd /* V4 i.. ULONG */
Boopsi_TagScreen = 0x8042bc71 /* V4 isg ULONG */
WHEEL_Hue = 0x84000001
WHEEL_Saturation = 0x84000002
WHEEL_Screen = 0x84000009
/* TAG variable definitions */
TRUE = 1
FALSE = 0
Listview_DragType_None = 0
Listview_DragType_Immediate = 1
Frame_None = 0
Frame_Text = 3
TriggerValue = 0x49893131
EveryTime = 0x49893131
address DEMO
window TITLE '"MUIRexx Demo"' COMMAND '"quit"' PORT DEMO
menu LABEL '"Project"'
item COMMAND '"method 'Application_AboutMUI' 0"' PORT DEMO LABEL '"About MUI"'
menu LABEL '"Settings"'
item COMMAND '"method 'Application_OpenConfigWindow'"' PORT DEMO LABEL '"MUI..."'
endmenu
item ATTRS Menuitem_Title '-1'
item COMMAND '"quit"' PORT DEMO ATTRS Menuitem_Shortcut 'Q' LABEL '"Quit"'
endmenu
menu LABEL '"Demo"'
item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Menuitem 1"'
item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Menuitem 2"'
menu LABEL '"Submenu"'
item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Submenuitem 1"'
item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Submenuitem 2"'
endmenu
endmenu
text LABEL 'A demonstration of MUIRexx'
group REGISTER LABELS '"Gadgets,Lists,Cycles,Icons,Strings,Boopsi"'
group
view ID GVIEW '"A simple demonstration of some of the gadgets available.
Most gadgets are internal to MUIRexx but others are built from internal and
external classes. Notice that some gadgets are linked to others."'
object CLASS '"Balance.mui"'
group HORIZ
object ID GCLR CLASS '"Coloradjust.mui"'
object CLASS '"Balance.mui"'
group
space
group HORIZ
space HORIZ
group
knob ID KNOB HELP '"an example knob gadget\012Press HELP for more info"' NODE '"knob"'
popslider ID PSLD HELP '"an example popup slider gadget\nPress HELP for more info"' NODE '"popslider"'
endgroup
meter ID METR NODE '"meter"' LABEL '"meter"'
space HORIZ
endgroup
slider ID SLDR HELP '"an example slider gadget\nPress HELP for more info"' NODE '"slider"'
gauge ID GAUG NODE '"gauge"' LABEL '"level %ld"' ATTRS Gauge_Horiz TRUE
object CLASS '"Scale.mui"'
space
endgroup
endgroup
group 'FRAME' HORIZ
check COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"check"' STRINGS '"unselected,selected"'
text COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"text"' LABEL 'text'
button COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"button"' LABEL 'button'
image COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"image"' SPEC '"4:MUI:Images/WD/13pt/PopUp.mf0"' STRING 'image'
object CLASS '"Balance.mui"'
string ID STR
endgroup
object CLASS '"Busy.mcc"' ATTRS Weight 0
endgroup
group
view '"A demonstration of some lists available. Notice that the
volume list is linked to the directory list and the directory list is linked
to the string gadget. This view list is another example of a possible list.
Note that view lists are read-only."'
group HORIZ
group ATTRS Weight 0
button ID DF0 ATTRS Draggable TRUE LABEL 'DF0:'
button ID DH0 ATTRS Draggable TRUE LABEL 'DH0:'
button ID DH1 ATTRS Draggable TRUE LABEL 'DH1:'
button ID SYS ATTRS Draggable TRUE LABEL 'SYS:'
button ID RAM ATTRS Draggable TRUE LABEL 'RAM:'
endgroup
dirlist ID DIR1 PATH '"ram:"' PRESS APP DROP,
COMMAND '"dirlist ID DIR1 PATH %s"' PORT DEMO NODE '"dirlist"',
ATTRS Frame Frame_Text Listview_DragType Listview_DragType_Immediate
volumelist,
COMMAND '"dirlist ID DIR1 PATH %s"' PORT DEMO NODE '"volumelist"',
ATTRS Weight 50
group
space
button ID VIEW ICON '"muirexx:demos/icons/multiview"' DROP,
COMMAND '"string ID FILE CONTENT view %s"' PORT DEMO NODE '"button"'
space
endgroup
endgroup
string ID FILE
endgroup
group
view '"A demonstration of cycle and radio gadgets. This page shows
some more examples of linked gadgets."'
group HORIZ
group 'FRAME' LABEL '"Computer:"'
radio ID RCMP,
COMMAND '"cycle ID CCMP LABEL %s"' PORT DEMO NODE '"radio"',
LABELS '"Amiga_500,Amiga_600,Amiga_1000,Amiga_1200,Amiga_2000,Amiga_3000,Amiga_4000,Amiga_4000T"'
endgroup
group
group 'FRAME' LABEL '"Printer:"'
radio ID RPRT,
COMMAND '"cycle ID CPRT LABEL %s"' PORT DEMO NODE '"radio"',
LABELS '"HP_Deskjet,NEC_P6,Okimate_20"'
endgroup
group 'FRAME' LABEL '"Display:"'
radio ID RDSP,
COMMAND '"cycle ID CDSP LABEL %s"' PORT DEMO NODE '"radio"',
LABELS '"A1081,NEC_3D,A2024,Eizo_T660i"'
endgroup
endgroup
group 'FRAME' LABEL '"Cycle Gadgets"'
group HORIZ
group
label '"Computer:"'
label '"Printer:"'
label '"Display:"'
endgroup
group
cycle ID CCMP,
COMMAND '"radio ID RCMP LABEL %s"' PORT DEMO NODE '"cycle"',
LABELS '"Amiga_500,Amiga_600,Amiga_1000,Amiga_1200,Amiga_2000,Amiga_3000,Amiga_4000,Amiga_4000T"'
cycle ID CPRT,
COMMAND '"radio ID RPRT LABEL %s"' PORT DEMO NODE '"cycle"',
LABELS '"HP_Deskjet,NEC_P6,Okimate_20"'
cycle ID CDSP,
COMMAND '"radio ID RDSP LABEL %s"' PORT DEMO NODE '"cycle"',
LABELS '"A1081,NEC_3D,A2024,Eizo_T660i"'
endgroup
endgroup
endgroup
endgroup
endgroup
group
view '"A demonstration of icon gadgets. Try clicking on the icons
below. Also try dropping some icons from the Workbench onto these icons. Try
to figure out what is unusual about the image on the right (hint: it is a gadget)."'
group HORIZ
button ID ICN1 ICON '"muirexx:demos/icons/edit"' PRESS APP DROP,
COMMAND '"string ID ISTR CONTENT edit %s"' PORT DEMO NODE '"button"',
LABEL 'ascii'
button ID ICN2 ICON '"muirexx:demos/icons/paint"' PRESS APP DROP,
COMMAND '"string ID ISTR CONTENT view %s"' PORT DEMO NODE '"button"',
LABEL 'picture'
button ID ICN3 ICON '"muirexx:demos/icons/multiview"' PRESS APP DROP,
COMMAND '"string ID ISTR CONTENT play %s"' PORT DEMO NODE '"button"',
LABEL 'anim'
button ID ICN4 ICON '"muirexx:demos/icons/help"' PRESS APP DROP,
COMMAND '"string ID ISTR CONTENT %s"' PORT DEMO NODE '"button"',
LABEL 'project'
button ID ICN5 ICON '"muirexx:demos/icons/shell"' PRESS APP DROP,
COMMAND '"string ID ISTR CONTENT execute %s"' PORT DEMO NODE '"button"',
LABEL 'tool'
space HORIZ
button PICT '"muirexx:demos/muirexx.brush"' TRANS,
ATTRS Frame Frame_None Draggable TRUE,
LABEL 'muirexx.brush'
endgroup
string ID ISTR
endgroup
group
view '"A demonstration of string gadgets. Try typing in some text
into the string gadget. Also select a file using the popasl gadget. Once some
lines have been added to the list try double clicking on one."'
list ID SLST COMMAND '"string ID SSTR CONTENT %s"' PORT DEMO NODE '"list"'
group HORIZ
group
label DOUBLE '"Entry:"'
label DOUBLE '"File:"'
endgroup
group
string ID SSTR COMMAND '"list ID SLST UPDATE INSERT STRING %s"' PORT DEMO NODE '"string"'
popasl ID SASL COMMAND '"list ID SLST UPDATE INSERT STRING %s"' PORT DEMO NODE '"popasl"'
endgroup
endgroup
endgroup
group
view '"A simple demonstration of boopsi gadgets. This demo
essentially duplicates the BoopsiDoor demo included with the MUI
distribution. It illustrates use of boopsi gadgets in MUIRexx and also
shows an example of notification methods."'
group HORIZ
group
label DOUBLE '"Hue:"'
label DOUBLE '"Saturation:"'
endgroup
group
gauge ID HUE ATTRS Gauge_Max 16384,
Gauge_Divide 262144,
Gauge_Horiz TRUE
gauge ID SAT ATTRS Gauge_Max 16384,
Gauge_Divide 262144,
Gauge_Horiz TRUE
endgroup
endgroup
object ID BOOP BOOPSI CLASS '"colorwheel.gadget"',
ATTRS Boopsi_MinWidth 30,
Boopsi_MinHeight 30,
Boopsi_Remember WHEEL_Hue,
Boopsi_Remember WHEEL_Saturation,
Boopsi_TagScreen WHEEL_Screen,
WHEEL_Screen 0,
WHEEL_Saturation 0,
FillArea TRUE
endgroup
endgroup
endwindow
method ID KNOB Notify Numeric_Value EveryTime @METR 3 Set Numeric_Value TriggerValue
method ID KNOB Notify Numeric_Value EveryTime @PSLD 3 NoNotifySet Numeric_Value TriggerValue
method ID PSLD Notify Numeric_Value EveryTime @METR 3 Set Numeric_Value TriggerValue
method ID PSLD Notify Numeric_Value EveryTime @KNOB 3 NoNotifySet Numeric_Value TriggerValue
method ID SLDR Notify Numeric_Value EveryTime @GAUG 3 Set Gauge_Current TriggerValue
method ID BOOP Notify WHEEL_Hue EveryTime @HUE 4 Set Gauge_Current TriggerValue
method ID BOOP Notify WHEEL_Saturation EveryTime @SAT 4 Set Gauge_Current TriggerValue
list ID SLST APP COMMAND '"list ID SLST UPDATE INSERT STRING %s"' PORT DEMO
exit